package com.example.myapplication.DesignPatterns.factory;

import com.example.myapplication.thirdcamera.util.Log;

/**
 * 工厂模式
 */
public interface Factory {

    public String createOperate();
}

class AddFactory implements Factory {

    @Override
    public String createOperate() {
        Log.i("dove_design","加法运算");
        return "加法运算";
    }
}

class SubFactory implements Factory{

    @Override
    public String createOperate() {
        Log.i("dove_design","减法运算");
        return "减法运算";
    }
}

class MulFactory implements Factory{

    @Override
    public String createOperate() {
        Log.i("dove_design","乘法运算");
        return "乘法运算";
    }
}

class DivFactory implements Factory{

    @Override
    public String createOperate() {
        Log.i("dove_design","除法运算");
        return "除法运算";
    }

}

